package com.tamtamy.jtta.data.xml;

import org.w3c.dom.Document;

import com.tamtamy.jtta.data.UserDetail;
import com.tamtamy.jtta.utility.XMLUtility;

public class XMLUserDetail extends UserDetail {

	public XMLUserDetail(Document xmlDocument) {	
		this.userID = XMLUtility.getString(xmlDocument, "userID");
		this.nickname = XMLUtility.getString(xmlDocument, "nickname");
		this.firstName = XMLUtility.getString(xmlDocument, "firstName");
		this.lastName = XMLUtility.getString(xmlDocument, "lastName");
		this.birthday = XMLUtility.getString(xmlDocument, "birthday");
		this.gender = XMLUtility.getString(xmlDocument, "gender");
		this.diskQuotaLimit = XMLUtility.getString(xmlDocument, "diskQuotaLimit");
		this.company = XMLUtility.getString(xmlDocument, "company");
		this.mail = XMLUtility.getString(xmlDocument, "mail");
		this.jabberMessenger = XMLUtility.getString(xmlDocument, "jabberMessenger");
		this.msnMessenger = XMLUtility.getString(xmlDocument, "msnMessenger");
		this.instantMessenger = XMLUtility.getString(xmlDocument, "instantMessenger");
		this.blog =XMLUtility.getString(xmlDocument, "blog");
		this.interest = XMLUtility.getString(xmlDocument, "interest");
		this.avatarFilename = XMLUtility.getString(xmlDocument, "avatarFilename");
		this.online = Boolean.parseBoolean(XMLUtility.getString(xmlDocument, "online"));
		this.department = XMLUtility.getString(xmlDocument, "department");
		this.contentList = XMLUtility.getStringList(xmlDocument, "contentList", "long");
		this.tagList = new XMLTagList(xmlDocument, "tagList");
	}

}
